<script setup lang="ts">
interface Prop {
  multiplying: number;
  handleMagnification: Function;
}
const props = defineProps<Prop>();
</script>

<template>
  <div class="content-multiplying-bar">
    <div class="content-multiplying-bar-title">{{ props.multiplying }}X</div>
    <div class="content-multiplying-bar-list">
      <div
          class="content-multiplying-bar-list-item"
          @click="props.handleMagnification(40)"
      >
        40
      </div>
      <div
          class="content-multiplying-bar-list-item"
          @click="props.handleMagnification(20)"
      >
        20
      </div>
      <div
          class="content-multiplying-bar-list-item"
          @click="props.handleMagnification(10)"
      >
        10
      </div>
      <div
          class="content-multiplying-bar-list-item"
          @click="props.handleMagnification(4)"
      >
        4
      </div>
      <div
          class="content-multiplying-bar-list-item"
          @click="props.handleMagnification(2)"
      >
        2
      </div>
      <div
          class="content-multiplying-bar-list-item"
          @click="props.handleMagnification(1)"
      >
        1
      </div>
    </div>
  </div>
</template>

<style scoped lang="less">
.content-multiplying-bar {
  width: 44px;
  height: 284px;
  background-color: rgba(40, 49, 66, 0.6);
  border-radius: 4px;
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 12px 5px 0;
  z-index: 1;
  &-title {
    font-weight: 600;
    font-size: 14px;
    color: #70e2f0;
    margin:0 0 12px -5px;
    text-align: center;
    width: 44px;
  }
  &-list {
    &-item {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      border: 1px solid #fff;
      font-weight: 500;
      font-size: 16px;
      line-height: 32px;
      text-align: center;
      color: #fff;
      margin-bottom: 8px;
      user-select: none;
    }
    &-item:nth-of-type(1) {
      color: rgba(255, 174, 224, 0.8);
      border-color: rgba(255, 174, 224, 0.8);
    }
    &-item:nth-of-type(2) {
      color: rgba(255, 185, 255, 0.8);
      border-color: rgba(255, 185, 255, 0.8);
    }
    &-item:nth-of-type(3) {
      color: rgba(229, 201, 255, 0.8);
      border-color: rgba(229, 201, 255, 0.8);
    }
    &-item:nth-of-type(4) {
      color: rgba(202, 215, 255, 0.8);
      border-color: rgba(202, 215, 255, 0.8);
    }
    &-item:nth-of-type(5) {
      color: rgba(153, 240, 255, 0.8);
      border-color: rgba(153, 240, 255, 0.8);
    }
    &-item:nth-of-type(6) {
      color: rgba(112, 226, 240, 0.8);
      border-color: rgba(112, 226, 240, 0.8);
    }
    &-item:hover {
      cursor: pointer;
    }
    &-item:nth-of-type(1):hover {
      background-color: rgba(255, 174, 224, 0.2);
    }
    &-item:nth-of-type(2):hover {
      background-color: rgba(255, 185, 255, 0.2);
    }
    &-item:nth-of-type(3):hover {
      background-color: rgba(229, 201, 255, 0.2);
    }
    &-item:nth-of-type(4):hover {
      background-color: rgba(202, 215, 255, 0.2);
    }
    &-item:nth-of-type(5):hover {
      background-color: rgba(153, 240, 255, 0.2);
    }
    &-item:nth-of-type(6):hover {
      background-color: rgba(112, 226, 240, 0.2);
    }
  }
}
</style>